<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="css/swiper-bundle.min(2).css">
    <script src="js/swiper-bundle.min(2).js"></script>
    <title>3D轮播</title>
    <!-- Demo styles -->
    <style>
        html,
        body {
            position: relative;
            height: 100%;
        }
        
        body {
            background: #fff;
            font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
            font-size: 14px;
            color: #000;
            margin: 0;
            padding: 0;
        }
        
        .swiper-container {
            width: 300px;
            height: 300px;
            position: absolute;
            left: 50%;
            top: 50%;
            margin-left: -150px;
            margin-top: -150px;
        }
        
        .swiper-slide {
            background-position: center;
            background-size: cover;
        }
    </style>
</head>

<body>
    <!-- Swiper -->
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide" style="background-image:url(img/3D/img4.jpg)"></div>
            <div class="swiper-slide" style="background-image:url(img/3D/img2.jpg)"></div>
            <div class="swiper-slide" style="background-image:url(img/3D/img3.jpg)"></div>
            <div class="swiper-slide" style="background-image:url(img/3D/img1.jpg)"></div>
            <div class="swiper-slide" style="background-image:url(img/3D/img5.jpg)"></div>

        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
    </div>

    <!-- Initialize Swiper -->
    <script>
        var swiper = new Swiper('.swiper-container', {
            effect: 'cube',
            autoplay: true, //等同于以下设置
            autoplay: {
                delay: 2000,
                stopOnLastSlide: false,
                disableOnInteraction: false,
            },
            grabCursor: true,
            cubeEffect: {
                shadow: true,
                slideShadows: true,
                shadowOffset: 20,
                shadowScale: 0.94,
            },
            pagination: {
                el: '.swiper-pagination',
            },
        });
    </script>
</body>

</html>